<% if @mission.finished? %>
	window.location = '<%= mission_path(@mission) %>?';
<% else %>
	<%= render :partial => 'refresh_candidates' %>

	$('#progress').html('<%= escape_javascript(render :partial => 'progress', :locals => {:mission => @mission} )%>')

	$('#distance_canvas').html('<%=escape_javascript(render :partial => "distance", :locals => { :distance => @mission.farthest, :mission => @mission } )%>');
	<% if @mission.farthest %>
		setMapCircle(<%= @mission.farthest %>, true);
	<% end %>

  init_candidate_events();
<% end %>
